import request from '@/utils/request'

// 查询公寓楼信息列表
export function list(query) {
  return request({
    url: '/dorm/room/list',
    method: 'get',
    params: query
  })
}

// 导出公寓楼信息列表
export function exportList(query) {
  return request({
    url: '/dorm/room/export',
    method: 'post',
    data: query
  })
}


// 获取公寓楼信息详细信息
export function getroomInfoById(query) {
  return request({
    url: '/dorm/room/' + query.roomId,
    method: 'get',
    params: query
  })
}


// 新增公寓楼信息
export function addInfo(query) {
  return request({
    url: '/dorm/room/add',
    method: 'post',
    data: query
  })
}


// 修改公寓楼信息
export function putInfoById(query) {
  return request({
    url: '/dorm/room/update',
    method: 'put',
    data: query
  })
}


// 删除公寓楼层信息
export function delInfoById(query) {
  return request({
    url: '/dorm/room/delete/' + query.roomId,
    method: 'DELETE',
  })
}